<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="UTF-8">
    <title>达内商城收藏夹</title>
    <link href="/user/css/header.css" rel="stylesheet" />
    <link href="/user/css/my.collect.css" rel="stylesheet" />
    <link href="/user/css/footer.css" rel="stylesheet" />
</head>
<body>

<!--顶部导航栏--> <!--注意引入的路径-->
<div th:replace="~{user/commons/commons::header}"></div>
<!-- nav主导航-->
<div>&nbsp;</div>

<div class="modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal_header">删除提醒</div>
        <div class="modal_information">
            <img src="/user/img/model/model_img2.png" alt="" /> <span>确定删除您的这个宝贝吗？</span>

        </div>
        <div class="yes" id="suer_delete">
            <span>删除</span>
        </div>
        <div class="no">
            <span>不删除</span>
        </div>
    </div>
</div>
<div class="modalNo" style="display: none">
    <div class="modal_dialog">
        <div class="modal_header">
            删除提示 <img src="/user/img/model/model_img1.png" alt="" class="rt close" />
        </div>
        <div class="modal_information">
            <img src="/user/img/model/model_img2.png" alt="" /> <span>请选择商品</span>

        </div>

    </div>
</div>

<div class="modalAdd" style="display: none">
    <div class="modal_dialog">
        <div class="modal_header">
            添加提示 <img src="/user/img/model/model_img1.png" alt="" class="rt close" />
        </div>
        <div class="modal_information">
            <img src="/user/img/model/model_img2.png" alt="" /> <span>请选择商品</span>

        </div>

    </div>
</div>

<div class="big">
    <form name="" action="" method="post">
        <section id="section">
            <div id="title">
                <b>收藏商品</b>

            </div>
            <div id="box">
                <div class="imfor_top">
                    <div class="manage">
                        <span class="normal">管理收藏夹</span>

                    </div>
                    <div class="check_top">
                        <div class="all">
								<span class="normal"> <img
                                        src="/user/images/myCollect/product_normal.png" alt="" /></span>全选
                        </div>
                        <div class="del">删除</div>
                        <div class="allAdd">加入购物车</div>
                        <div class="sure" style="display: none">
                            <img src="/user/images/myCollect/product_true.png" alt="" /> <span>已移入购物车</span>
                        </div>
                    </div>

                </div>
                <div>
                <div id="content_box" >
                        <div class="lf" id="${book.isbn}" th:each="book : ${books}">
                            <span style="display: none" id="isbn">${list.isbn}</span>
                            <div class="img">
                                <a th:href="@{'/user/page/detail?isbn='+${book.isbn}}"> <img
                                        th:src="@{'/user/img/goods/'+${book.isbn}+'/collect.jpg'}" alt="" />
                                </a>
                            </div>
                            <div class="describe">
                                <p>${list.title}</p>
                                <span class="price"><b>￥</b><span class="priceContent" th:text="${book.price}"></span></span>
                                <span class="addCart"><a
                                        th:href="@{'/user/page/detail?isbn='+${book.isbn}}">查看</a></span> <span
                                    class="succee" style="display: none"> <img
                                    src="/user/img/myCollect/product_true.png" alt="" /> <span>已移入购物车</span>
									</span>
                            </div>
                            <div class="mask" style="display: none">
                                <div class="maskNormal">
                                    <img src="/user/img/myCollect/product_normal_big.png" alt="" />
                                </div>
                            </div>
                        </div>
                </div>
                </div>
            </div>


        </section>

    </form>
    <div class="none" style="display: none">
        <div class="none_content">
            <img src="/user/img/model/model_img3.png" alt="" class="lf" />
            <p class="lf">您的收藏夹竟然还是空哒( ⊙ o ⊙ )</p>
            <span class="lf">赶快去收藏商品吧！</span> <a href="#" class="lf">去购物>></a>
        </div>

    </div>
</div>
<!-- 品质保障，私人定制等-->
<div id="foot_box">
    <div class="icon1 lf">
        <img src="/user/img/footer/icon1.png" alt="" />

        <h3>品质保障</h3>
    </div>
    <div class="icon2 lf">
        <img src="/user/img/footer/icon2.png" alt="" />

        <h3>私人定制</h3>
    </div>
    <div class="icon3 lf">
        <img src="/user/img/footer/icon3.png" alt="" />

        <h3>学员特供</h3>
    </div>
    <div class="icon4 lf">
        <img src="/user/img/footer/icon4.png" alt="" />

        <h3>专属特权</h3>
    </div>
</div>
<!-- 页面底部-->
<div th:replace="~{user/commons/commons::foot}"></div>

<script src="/user/js/jquery-3.1.1.min.js"></script>
<script src="/user/js/collect.js"></script>


<script>


    <!-- 加入购物 -->

    $(function() {
        var Go = $("#go").click(function() {
            var value = $("#page").val();
            if(value==""){
                alert("跳转页数不能为空");
                return;
            }
            var b = isInteger(value);
            if(b){
                window.location.href = "collect.do?pageCode="+value;
            }else{
                alert("跳转错误");
                $("#page").val("");
            }
        });
    });

    $(function(){
        if(!$(".imfor")) {
            $('#section').hide();
            $('.none').show();
        }
    })
    //搜索下拉
    $('.seek').focus(function(){

        if($(this).hasClass('clickhover')){

            $(this).removeClass('clickhover');
            $(this).find('.seek_content').hide();
            $(this).find('img').attr('src','/user/img/header/header_normal.png');

        }else{
            $(this).addClass('clickhover');
            $(this).find('.seek_content').show();
            $(this).find('img').attr('src','/user/img/header/header_true.png');
        }
    })
    $('.seek_content>div').click(function(){
        $('.seek').removeClass('clickhover');
        var text=$(this).html();
        $('.seek span').html(text);
        $(this).parent().hide();
        $('.seek').find('img').attr('src','/user/img/header/header_normal.png');
        $('.seek').blur();

    })

    $('.seek').blur(function(){

        $('.seek').removeClass('clickhover');
        $('.seek_content').hide();

        $('.seek').find('img').attr('src','/user/img/header/header_normal.png');
        console.log(1);
    })
    $(".care").hover(function(){
        $(this).attr('src',"/user/img/header/care1.png");
    },function(){
        $(this).attr('src',"/user/img/header/care.png");
    });
    $(".order").hover(function(){
        $(this).attr('src',"/user/img/header/order1.png");
    },function(){
        $(this).attr('src',"/user/img/header/order.png");
    });
    $(".shopcar").hover(function(){
        $(this).attr('src',"/user/img/header/shop_car1.png");
    },function(){
        $(this).attr('src',"/user/img/header/shop_car.png");
    });

    //搜索
    $(document).keydown(function(event){
        if(event.keyCode ==13){
            searchBook();
        }
    });
    $("#search").click(function(){
        searchBook();
    });

    function searchBook(){
        var search = $("#input").val();
        if(search==""){
            alert("搜索内容不能为空");
            return;
        }else{
            window.location.href="searchBook.do?search="+search;
            //window.location.href='searchBook.do?search='+search;
            return;
        }
    }

</script>
</body>
</html>
